<?php if ($is_open_reg !== FALSE): ?>
		<script type="text/javascript" src="<?=script_url('custom/get_section');?>"></script>
		<div class="row">
			<div class="panel">Student Registration</div>

			<table class="table">
				<tr class="info">
					<td>Student Selected</td>
					<td>Previous Grade Level</td>
					<td>Student Id #</td>
				</tr>
			<?if($profile):?>
				<tr>
					<td><strong><?=ucwords(strtolower($profile->fullname));?></strong></td>
					<td><strong><?=ucwords(strtolower($profile->level_desc));?></strong></td>
					<td><strong><?=ucwords(strtolower($profile->idno));?></strong></td>
				</tr>
			<?endif;?>
			</table>
		</div>
		
		<?php
		if($duplicate){
		?>
			<div class="alert alert-info"><h5><span class="icon-ok" ></span>&nbsp; Student is already enrolled.</h5></div>
		<?php
		}else{
		?>
		
		<div class="row" style="border:2px dotted #003366; padding:5px" >
			
			<?=form_open('', ' id="check-level-form"')?>
				
				<div class="alert-box"><i class="icon-info-sign"></i> Enrolle status Set [OLD], please select level</div>

				<?=$system_message;?>

				<fieldset>
					<p class="small-info">
						Please select a Grade level, after selecting a block section will automatically pop up below. Please select a block, if the selected grade level has no block, please continue.
					</p>
					<legend class="label label-success">Select Grade Level</legend>
					<label class="label label-info">Grade Level.</label>
					<?=form_dropdown('grade_level',$levels,NULL,'id="level-section" url="'.site_url('output/get_section_data').'" required');?>
				</fieldset>

				<fieldset>
					<legend class="label label-success">Select Block/Section</legend>
						<table class="table" style="width:100%;">
							<thead>
								<tr>
									<td class="center">&nbsp;</td>
									<td class="center">Section Name</td>
									<td class="center">Adviser</td>
									<td class="center">Available Slot</td>
								</tr>
							</thead>
							<tbody class="dynamictable">
								<tr>
									<td colspan="4"><p class="alert alert-info">Please Select a Grade level First.</p></td>
								</tr>
							</tbody>
						</table>
				</fieldset>
				
				<input type="hidden" name="helu" id="helu" value="<?=rand()?>">
				<input type="submit" class="btn btn-primary" name="save_enroll" id="save_enroll" value="Submit Registration">
				<a href="<?=site_url('registration')?>" class="btn btn-default">Cancel</a>

			<?=form_close();?>

		</div>
		<script type="text/javascript" src="<?=script_url('custom/checkformsubmit');?>"></script>
		
		<?php
		}
		?>
		
<?php else: ?>
	
	<?@$this->load->view('registration/_registration_close_msg');?>

<?php endif; ?>


<div id="enrollDialog"><p></p><div class="content"></div></div>
<div id="msgDialog2" title ="System Message" ><p></p><div class="content"></div></div>